package com.amit.hibernate;

import org.hibernate.Session;
import org.hibernate.SessionFactory;
import org.hibernate.Transaction;

public class Lab36 {

	public static void main(String[] args) {
		
			try{
				SessionFactory sf=Chibernateutil.getFactory();
			
			Session session=sf.openSession();
			Transaction tx=session.beginTransaction();
			Student cust=new Student(SIDgenerator.getNextSid(),"rishi1","blore", "999");
			session.save(cust);
			
			
			tx.commit();
			session.close();
		}catch(Exception e){
			e.printStackTrace();
		}
			}
}
